package com.senlingspace.system.service;

import com.senlingspace.common.core.domain.AjaxResult;
import com.senlingspace.system.domain.SlkjCustomerAddress;

import java.util.List;

/**
 * 客户地址Service接口
 *
 * @author lebronjames
 * @date 2024/10/02
 */
public interface ISlkjCustomerAddressService {

    /**
     * 查询客户地址
     *
     * @param customerId
     * @return {@link List }<{@link SlkjCustomerAddress }>
     */
    List<SlkjCustomerAddress> selectAllByCustomerId(Long customerId);

    /**
     * 获取默认地址
     *
     * @param customerId
     * @return {@link SlkjCustomerAddress }
     */
    SlkjCustomerAddress getDefault(Long customerId);

    /**
     * 设置默认地址
     *
     * @param addressId
     * @param customerId
     */
    AjaxResult setDefault(Long addressId, Long customerId);

    /**
     * 新增客户地址
     *
     * @param address
     * @return {@link AjaxResult }
     */
    AjaxResult insert(SlkjCustomerAddress address);

    /**
     * 删除客户地址
     *
     * @param addressId
     * @param customerId
     * @return {@link AjaxResult }
     */
    AjaxResult deleteById(Long addressId, Long customerId);

    /**
     * 更新客户地址
     *
     * @param address
     * @return {@link AjaxResult }
     */
    AjaxResult updateById(SlkjCustomerAddress address);

}
